package businessEntities;

import java.util.List;

/**
 *  Contains result of query on database.
 *  Each cell represented as string
 **/
public class QueryResultContainer {

    private final List<String> headers;
    private final List<String[]> data;

    public QueryResultContainer(List<String> headers, List<String[]> data) {
        this.headers = headers;
        this.data = data;
    }

    public Object getDataAt(int i, int j) {
        return (data.get(i))[j];
    }

    public String getColumnAt(int index) {
        return headers.get(index);
    }

    public int getColumnCount() {
        return headers.size();
    }

    public int getRowCount() {
        return data.size();
    }
}
